﻿<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$eComDBConnection$" formatter="bizobj of eComDiscountCode" >
	<Sql>
		SELECT
			qd.id, qd.companyId, qd.name, qd.code, qd.baseDiscount, qd.percentCost, qd.bizRuleCalculator
		FROM
			eComProductQuantityDiscounts 
			INNER JOIN eComDiscountsCoded qd ON eComProductQuantityDiscounts.pricingId = qd.id	
		WHERE
			eComProductQuantityDiscounts.productId = @productId and code = @code
	</Sql>

	<Param name="productId" type="UniqueIdentifier"/>
	<Param name="code" type="String" />
</AdoNetDataAccess>